import java.util.Scanner;

public class pp28
{
   public static void main (String[] args)
   {
  //  1 jiao = 10 fen
  //  1 yuan = 100 fen
 //  1 yuan = 10 jiao
   int a, b, c, d, e, f;
   double g;

  Scanner scan = new Scanner (System.in);

  System.out.print ("one fen: ");
  a = scan.nextInt( );

   System.out.print ("two fen: ");
  b = scan.nextInt( );

  System.out.print ("five fen: ");
  c = scan.nextInt( );

  System.out.print ("two jiao: ");
  d = scan.nextInt( );

  System.out.print ("five jiao: ");
  e = scan.nextInt( );

  System.out.print ("one yuan: ");
  f = scan.nextInt();

   g = a + b * 2 + c * 5 + d * 20 + e * 50 + f * 100;//out there are how many fen.

  System.out.println ("SUM: " + g);
   }
}

